<div class="wrapper-1">
  <div class="wrapper-2">
    <div class="wrapper-3">
      <div class="left-bg">
        <div class="right-bg">
          <div id="middle">
            <div id="middle-expand">
              <div id="main">
                <div id="main-shift">
                  <div class="contentleft-bg">
                    <div class="contentright-bg">
                      <div id="mainmiddle">
                        <div id="mainmiddle-expand">
                          <div id="content">
                            <div id="content-shift">
                              <div id="breadcrumbs"> <span class="breadcrumbs"> <a href="<?php echo base_url(); ?>">Home</a><a href="javascript:void(0)">Train Options</a><a href="javascript:void(0)"><span class="current">Train Details</span></a><a href="javascript:void(0)">Payment</a><span class="end">Thank you</span></span> </div>
                              <div id="component" class="floatbox"> 
                                <script type="text/javascript" src="<?php echo base_url(); ?>public/scripts/payment.js"></script> 
                                <script type="text/javascript">
								  $(document).ready(function(){
									$("#btn-submit").click(function(){
										//alert("true"); return false;
										name = $("#haname").val();
										email = $("#haemail").val();
										remail = $("#haremail").val();
										phone = $("#haphone").val();
										addres = $("#haaddress").val();
										info = $("#hacontent").val();
										country = $("#hacountry").val();
										$error = $("#herrors");
									    $error.html("<img src='<?php echo base_url(); ?>public/images/ajax-loader.gif' />");
									    if(name == "" || email == "" || addres == ""){
										  $error.html("Please enter your information");
										  $("#haname").focus();
										  return false;
									    }else{
										  if(email != remail){
											  $error.html("Confirm email not match!");
											  return false;
										  }
										  jQuery.post("<?php echo base_url()."home/services/ajax"; ?>",{name:name,email:email,phone:phone,country:country,info:info,addres:addres},function(result){
											 if(result == 1){ 
											 	$error.html("Valid email address!"); 
											 }else{
												 $error.html("<img src='<?php echo base_url(); ?>public/images/ajax-loader.gif' />");
												 //$error.html(result); return false;
												 $error.html("<span style='color:green;font-weight:bold'>Thank for your booking, We will reply you soon</span> <br /><img src='<?php echo base_url(); ?>public/images/4-0.gif' /> Redirect to home...");
												 $("#hname").val("");$("#hemail").val("");$("#hphone").val("");$("#hinfo").val("");
												 setTimeout(function(){
													 window.location = "<?php echo base_url(); ?>";
												 },12000);
											 }
										  });
										}
									  return false;
									});
								  });
								</script>
                                <div class="columnwidth-310">
                                  <div class="article">
                                    <h2>Train Ticket Infomation</h2>
                                    <br>
                                    <table class="checkout-details" summary="Check Out">
                                      <thead>
                                        <tr>
                                          <th scope="col">Train info</th>
                                          <th scope="col">Start Date</th>
                                          <th scope="col">Adults <span style="color:red">(+10years)</span></th>
                                          <th scope="col">Child <span style="color:red">(2-10years)</span></th>
                                          <th scope="col">Total</th>
                                          <th scope="col"></th>
                                        </tr>
                                      </thead>
                                      <tbody>
                                        <?php $i=1; foreach($cart as $items){ ?>
                                        <tr>
                                          <td colspan="5" style="border-bottom:0px"><h3><span style="font-size:16px; color:Black">1)</span><?php echo $items['options']['from']; ?> - <?php echo $items['options']['to']; ?><span style="font-size:14px;">- Ticket type: <?php echo $items['name']; ?> - Fare: <span> <b><?php echo $items['price']; ?></b>USD </span></span></h3>
                                            <p><span id="Date38"></span></p></td>
                                        </tr>
                                        <tr>
                                          <td><?php echo $items['options']['train']; ?>
                                            <p>Dep. <b><?php echo $items['options']['start']; ?></b>- Arr. <b><?php echo $items['options']['end']; ?></b></p></td>
                                          <td><label style="padding:2px;text-align:left;width:auto">Start Date<span style="color:red">(*)</span></label>
                                            <input class="hadate hasDatepicker" name="<?php echo $i; ?>" style="width:80px;" type="text">
                                            <input type="hidden" readonly="readonly" id="service<?php echo $i; ?>" value="<?php echo $items['options']['price']; ?>" />
                                            <input type="hidden" readonly="readonly" id="idpro<?php echo $i; ?>" value="<?php echo $items['rowid']; ?>" />
                                            <input type="hidden" readonly="readonly" id="price<?php echo $i; ?>" value="<?php echo $items['price']; ?>" />
                                            <input type="hidden" readonly="readonly" size="25" class="hatotal" id="hatotal<?php echo $i; ?>" value="<?php echo $items['price']; ?>" /></td>
                                          <td><select class="hachange" id="adult<?php echo $i
										  ; ?>" title="<?php echo $i; ?>" style="width:50px;">
                                              <?php for($j=1;$j<=10;$j++){ ?>
                                              <option value="<?php echo $j; ?>"><?php echo $j; ?></option>
                                              <?php } ?>
                                            </select></td>
                                          <td><select class="hachange" id="child<?php echo $i; ?>" title="<?php echo $i; ?>" style="width:50px;">
                                              <option value="0" selected="selected">0</option>
                                              <?php for($k=1;$k<=10;$k++){ ?>
                                              <option value="<?php echo $k; ?>"><?php echo $k; ?></option>
                                              <?php } ?>
                                            </select></td>
                                          <td><span id="cost<?php echo $i; ?>" style="color:#F60;font-size:12px;font-weight:bold">$<?php echo $items['price']; ?></span></td>
                                          <td><span class="booking"><a href="<?php echo base_url()."home/cart/delone/".$items['id'];?>" title="Delete" class="empty">Delete</a></span></td>
                                        </tr>
                                        <tr>
                                          <td colspan="6" style="background:#69c;"></td>
                                        </tr>
                                        <?php $i++; } ?>
                                        <tr>
                                          <td colspan="6"><div style="display:block; float:right; text-align:right">
                                              <p></p>
                                              <hr>
                                              <h3><span id="TotalFare">Total fare: $<?php echo $this->cart->total(); ?></span></h3>
                                              (Including Fees &amp; taxes)</div></td>
                                        </tr>
                                      </tbody>
                                    </table>
                                    <h2>Contact Infomation</h2>
                                    <input type="hidden" size="25" id="totalall" readonly="readonly" value="<?php echo $this->cart->total(); ?>" />
                                    <form action="javascript:void(0)" method="post" style="margin:30 30 5 30px; padding:5px">
                                      <fieldset style="position:relative">
                                        <legend>Infomation</legend>
                                        <div style="float: left; display:block; text-align:left">
                                          <label for="Name">Full Name <span style="color:red"> (*)</span></label>
                                          <input id="haname" name="Name" maxlength="100" style="width: 300px; float: left;" placeholder="e.g Maria Christensen" type="text">
                                        </div>
                                        <div style="float: left; display:block; text-align:left">
                                          <label for="Email">Email<span style="color:red"> (*)</span></label>
                                          <input id="haemail" name="Email" style=" width: 300px; float: left;" placeholder="e.g you@example.com" type="text">
                                        </div>
                                        <div style="float: left; display:block; text-align:left">
                                          <label for="ConfirmEmail">Confirm Email<span style="color:red"> (*)</span></label>
                                          <input id="haremail" style=" width: 300px; float: left;" type="text">
                                        </div>
                                        <div style="float: left; display:block; text-align:left">
                                          <label for="Phone">Phone  (Country, Area Code, Number)</label>
                                          <input id="haphone" name="Phone" style=" width: 300px; float: left;" placeholder="e.g +84904619926" type="text">
                                        </div>
                                        <div style="float: left; display:block; text-align:left">
                                          <label for="Address">Address in Vietnam for delivering your tickets <span style="color:red"> (*)</span></label>
                                          <input id="haaddress" name="Address" style=" width: 300px; float: left;" placeholder="e.g HANOI HOTEL Hang Gai, Hoan Kiem District, Hanoi." type="text">
                                        </div>
                                        <div style="float: left; display:block; text-align:left">
                                          <label for="Content">Message</label>
                                          <textarea id="hacontent" name="Message" rows="5" cols="20" style=" width: 300px; float: left;" placeholder="e.g Check-in Hanoi Hotel: 01 December 2012, room 202. Check-in Name: Maria Christensen. (Agoda.com HotelID:19823940)"></textarea>
                                          <br>
                                          Specialty messenger, Check in date, ID Booking by Agoda.com... </div>
                                        <div style="float: left; display:block; text-align:left">
                                          <label for="Country">Country</label>
                                          <?php $this->load->view("public/country"); ?>
                                        </div>
                                        <div id="herrors"></div>
                                      </fieldset>
                                      <p>
                                        <input id="btn-submit" value="Continue" class="button" style="float:right; font-size:18px;font-weight:bold;padding:7px;" type="submit">
                                        Fares are not guaranteed until phpandmysql.net confirms your booking and payment is made in full. </p>
                                    </form>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                          <!-- content end --> 
                          
                        </div>
                      </div>
                      <!-- mainmiddle end --> 
                    </div>
                  </div>
                </div>
              </div>
              <div id="right" style="min-height: 955px; ">
                <div class="module with-header mod-rounded   first ">
                  <div class="header-1">
                    <div class="header-2">
                      <div class="header-3"></div>
                    </div>
                  </div>
                  <h4 class="header"><span class="color" style="color:red">Important Information</span></h4>
                  <div class="box-t1">
                    <div class="box-t2">
                      <div class="box-t3"></div>
                    </div>
                  </div>
                  <div class="box-1">
                    <div class="box-2">
                      <div class="box-3 deepest"> <span><b>1, TICKET TYPES</b></span>
                        <ul>
                          <li>Ticket type: 6 berths in one cabin</li>
                          <li>Ticket type: 4 berths in one cabin</li>
                          <li>Ticket type: 2 berths in one cabin</li>
                        </ul>
                        <span><b>2, CHILDREN</b></span>
                        <ul>
                          <li>Under 2 years:  Travel free</li>
                          <li>From 2 to under 9 years old (and shorter than 1.3m):  Price will be 50% of adult price for the North - South trains and and vice versa. <span style=" color:red">But for trains <b>Hanoi - Sapa</b> and vice versa, the children will have to pay full price like the adults!</span></li>
                          <li>Over 9 years old: 100% of adult price.</li>
                        </ul>
                        <span><b>3, BAGGAGES</b></span>
                        <ul>
                          <li>Carry-on Bags for adults: 20kg and Children: 10kg</li>
                        </ul>
                      </div>
                    </div>
                  </div>
                  <div class="box-b1">
                    <div class="box-b2">
                      <div class="box-b3"> </div>
                    </div>
                  </div>
                </div>
                <?php $this->load->view("public/advs"); ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<div class="wrapper-b1">
  <div class="wrapper-b2">
    <div class="wrapper-b3"></div>
  </div>
</div>
</div>
</div>
</div>
